-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CngKey.KeySize for keys in the Platform Crypto Provider #77809
Conversation
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsContributes to #75971. The MicrosoftPlatformCryptoProvider does not correctly report the The
|
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
...s/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography.Cng/tests/PropertyTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography.Cng/tests/PropertyTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Security.Cryptography.Cng/tests/PropertyTests.cs
Outdated
Show resolved
Hide resolved
...s/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs
Outdated
Show resolved
Hide resolved
...s/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Stephen Toub <stoub@microsoft.com>
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
I am quite perplexed by the outerloop test results. Every test suite seems to be crashing on multiple operating systems? These changes are isolated to Windows, so I would be a little surprised if these changes are breaking OSX-outerloop. |
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
One more try to see if it was an infrastructure issue. |
...s/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs
Outdated
Show resolved
Hide resolved
...s/System.Security.Cryptography/src/System/Security/Cryptography/CngKey.StandardProperties.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
@bartonjs I've been blocked on getting a meaningful outerloop run here for a while. Am I using the right pipeline? Thoughts on how to proceed? |
I think you're hitting #76755... which, AFAICT, means that all outerloop runs are broken. I've asked for contrary evidence (such as a variant config that would run the test, but works), but since I haven't received any I decided to say this much. |
Okay. I guess this PR can just hang out for a while. Getting the PCP working with CNG will need a functioning outerloop. |
Merge ms/main into vcsjones/cng-key-size
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-libraries-coreclr outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
So it looks like Outerloop is working again, and the failures appear unrelated. However, the new tests are not running in CI because it appears that the CI machines do not have a functional TPM.
@bartonjs I'm going to hold off on merging this until you are back and may have additional input on if you want to merge this, or find a different approach to testing, if at all possible. Otherwise, the only way we'll catch regressions is running outerloop locally. |
Contributes to #75971.
Contributes to #71009.
The MicrosoftPlatformCryptoProvider does not correctly report the
KeySize
forCngKey
(and by extension,ECDsaCng
andECDiffieHellmanCng
key size properties) and instead always returns zero.The
ECCCurveName
CNG property does appear to be properly reported for those keys, so when we find ourselves in this circumstance, use the curve name if available to properly report the key size.